﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="Content-Language" content="zh-CN" />
		<meta name="copyright" content="闻康集团刘代明监制" />
		<meta name="robots" content="all" />
		<?php echo $css_file; ?>
	</head>
	<body>
	<div class="main" >
		<div class="crumbs">
			当前位置：<span id="current_pos">疾病自测管理->{$carray}</span>
		</div>
		<div  class="m_content" id="right_main">
			<form  method="post" action="__GROUP__/Disassistant/checkStandardaddedit_save/type/{$type}" enctype="multipart/form-data" onsubmit="return validate(this)" >
				<table cellspacing="0" id="addcatetable">
					<tr>
						<td class="alineright">APP名称:</td>
						<td>
							<select name="appname" onchange="changeState(this.value)">
								<option value="">默认</option>
								<?php 
									foreach ($appname as $key=>$val){
									if($val['id']==$detail['appname']){
									echo '<option value="'.$val['id'].'" selected="selected">'.$val['appname'].'</option>';
									}else{
									echo '<option value="'.$val['id'].'">'.$val['appname'].'</option>';
									}
									}
								?>
							</select>
						</td>
					</tr>
					<?php if ($type==3){?>
					<tr>
						<td class="alineright">遗传危险度:</td>
						<td>
						<label><input type="radio" value="1" name="geneticrisk" <?php if ($detail['geneticrisk']==1 || $detail['geneticrisk']==0) echo 'checked="checked"'; ?>>无遗传性</label>&nbsp;&nbsp;
						<label><input type="radio" value="2" name="geneticrisk" <?php if ($detail['geneticrisk']==2) echo 'checked="checked"'; ?>>遗传率1～20%</label>&nbsp;&nbsp;
						<label><input type="radio" value="3" name="geneticrisk" <?php if ($detail['geneticrisk']==3) echo 'checked="checked"'; ?>>遗传率21～40%</label>&nbsp;&nbsp;
						<label><input type="radio" value="4" name="geneticrisk" <?php if ($detail['geneticrisk']==4) echo 'checked="checked"'; ?>>遗传率41～80%</label>&nbsp;&nbsp;
						<label><input type="radio" value="5" name="geneticrisk" <?php if ($detail['geneticrisk']==5) echo 'checked="checked"'; ?>>遗传率81～100%</label>
						
						</td>
					</tr>
					<?php }?>
					<tr>
						<td class="alineright">{$carray}:</td>
						<td><textarea id="content" name="content" style="width:700px;height:300px;"><?php if($detail['content']){ echo $detail['content'];}?></textarea></td>
					</tr>
					<tr>
						<td class="alineright"></td>
						<td><input type="hidden" name="id" size="25" value="{$id}" /><input type="hidden" name="type" size="25" value="{$type}" /><input type="submit" value="确定" /> <input type="reset" value="重置" />
						</td>
					</tr>
				</table>
			</form>
		</div>
	</div>
	<?php echo $js_file, $editor; ?>
	<script type="text/javascript">
		 /**
		 * 验证
		 */
		function validate(form) {
			var descValue = CKEDITOR.instances.content.getData(); 
			if (form.appname.value == "") {
				alert("请填写APP名称");
				form.appname.focus();
				return (false);
			}
			if (descValue == "") {
				alert("请填写{$carray}");
				CKEDITOR.instances.content.focus();
				return (false);
			}
			return true;
		}
		/**
		 * 编辑器配置
		 */
		// 启用 CKEitor 的上传功能，使用了 CKFinder 插件
		CKEDITOR.replace('content', {
			filebrowserBrowseUrl: '__PUBLIC__/ckfinder/ckfinder.html',
			filebrowserImageBrowseUrl: '__PUBLIC__/ckfinder/ckfinder.html?Type=Images',
			filebrowserImageUploadUrl: '__PUBLIC__/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
		});
	</script>
	</body>
</html>